import {
  Link,
  useNavigate,
  useSearchParams,
  useParams,
} from 'react-router-dom';

const Article = () => {
  const navigate = useNavigate();
  const [params] = useSearchParams();
  const { id } = useParams();
  console.log(params.get('s'), id);
  return (
    <div>
      <Link to="/login">声明式跳转登录页</Link>
      <button onClick={() => navigate('/login')}>编程式跳转登录页</button>
    </div>
  );
};

export default Article;
